package com.skyd.core.android.game;

public class GameFloatBufferStepMotion extends GameNumberBufferStepMotion<Float> {

	/**
 * 初始值为null。
 * 功能注释：值传递管道接口对象
 */
	private  IGameValueDuct<GameObject,Float> _ValueDuct = null;
/**
 * 获取ValueDuct。
 * 功能注释：值传递管道接口对象
 * @return 当前的IGameValueDuct<GameObject,Float>类型的值
 */
	public  IGameValueDuct<GameObject,Float> getValueDuct() {
		return _ValueDuct;
	}
/**
 * 设置ValueDuct。
 * 功能注释：值传递管道接口对象
 * @param value 要设置的IGameValueDuct<GameObject,Float>类型值
 */
	public  void setValueDuct(IGameValueDuct<GameObject,Float> value) {
		_ValueDuct = value;
	}	
/**
 * 设置ValueDuct为其默认值(null)。
 * 功能注释：值传递管道接口对象
 */
	public  void setValueDuctToDefault() {
		setValueDuct(null);
	}
	
	public GameFloatBufferStepMotion(Float targetValue, Float stepLength,
			Float tolerance, float buffer,IGameValueDuct<GameObject,Float> valueDuct) {
		super(targetValue, stepLength, tolerance, buffer);
		setValueDuct(valueDuct);
	}

	@Override
	protected Float mul(Float v1, float v2) {
		return v1*v2;
	}

	@Override
	protected Float getCurrentValue(GameObject obj) {
		return getValueDuct().getValueFrom(obj);
	}

	@Override
	protected Float plus(Float v1, Float v2) {
		return v1+v2;
	}

	@Override
	protected void setCurrentValue(GameObject obj, Float value) {
		getValueDuct().setValueTo(obj,value);
	}

}
